/* 公共交通安全监控系统样式 */

/* 继承全局样式 */
@import url('./index.css');

/* 颜色变量 */
:root {
	--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--primary-color: #667eea;
	--primary-hover: #764ba2;
	--success-color: #67C23A;
	--warning-color: #E6A23C;
	--danger-color: #F56C6C;
	--info-color: #909399;
	--text-primary: #303133;
	--text-regular: #606266;
	--text-secondary: #909399;
	--border-color: #EBEEF5;
	--background-color: #f5f7fa;
}

/* 监控页面特有样式 */

/* 侧边栏菜单样式 */
.sidebar-menu .el-menu-item,
.sidebar-menu .el-submenu__title {
	height: 48px;
	line-height: 48px;
	border-radius: 0 24px 24px 0;
	margin: 2px 12px 2px 0;
	color: #6b7280;
	transition: all 0.3s ease;
}

.sidebar-menu .el-menu-item:hover,
.sidebar-menu .el-submenu__title:hover {
	background: rgba(102, 126, 234, 0.1) !important;
	color: #667eea !important;
}

.sidebar-menu .el-menu-item.is-active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	color: white !important;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.sidebar-menu .el-menu-item.is-active i,
.el-menu--popup .el-menu-item.is-active i {
	color: white !important;
}

.sidebar-menu .el-submenu .el-menu-item {
	margin: 1px 12px 1px 0;
	border-radius: 0 20px 20px 0;
	background: transparent;
}

.sidebar-menu .el-submenu .el-menu-item:hover {
	background: rgba(102, 126, 234, 0.08) !important;
}

/* Element UI 菜单样式覆盖 */
.el-menu {
	border-right: none;
}

.el-menu--popup {
	min-width: 200px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.el-menu--popup .el-menu-item {
	height: 40px;
	line-height: 40px;
	padding: 0 20px;
}

.el-menu--popup .el-menu-item:hover {
	background: rgba(102, 126, 234, 0.1) !important;
	color: #667eea !important;
}

.el-menu--popup .el-menu-item.is-active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	color: white !important;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

/* 监控区域样式 */
.camera-section, .alert-list {
	background: #fff;
	border-radius: 8px;
	margin: 20px;
	padding: 20px;
	box-shadow: 0 2px 12px 0 rgba(102, 126, 234, 0.1);
}

.section-header, .alert-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.section-header h3, .alert-header h3 {
	margin: 0;
	font-size: 18px;
	color: var(--text-primary);
	font-weight: 600;
}

.section-filters, .alert-filters {
	display: flex;
	align-items: center;
}

.section-filters .el-radio-group,
.alert-filters .el-radio-group {
	display: flex;
	border: none;
	background: #fff;
}

.section-filters .el-radio-button,
.alert-filters .el-radio-button {
	margin-right: 10px;
}

.section-filters .el-radio-button:last-child,
.alert-filters .el-radio-button:last-child {
	margin-right: 0;
}

.section-filters .el-radio-button__inner,
.alert-filters .el-radio-button__inner {
	border: 1px solid #DCDFE6;
	border-radius: 4px !important;
	padding: 8px 15px;
	height: auto;
	line-height: 1;
	font-size: 14px;
	color: var(--text-regular);
	background: #fff;
}

.section-filters .el-radio-button:first-child .el-radio-button__inner,
.alert-filters .el-radio-button:first-child .el-radio-button__inner {
	border-radius: 4px !important;
	border-left: 1px solid #DCDFE6;
}

.section-filters .el-radio-button:last-child .el-radio-button__inner,
.alert-filters .el-radio-button:last-child .el-radio-button__inner {
	border-radius: 4px !important;
}

/* 选中状态 */
.section-filters .el-radio-button__orig-radio:checked + .el-radio-button__inner,
.alert-filters .el-radio-button__orig-radio:checked + .el-radio-button__inner {
	background-color: #7B68EE;
	border-color: #7B68EE;
	color: #fff;
	box-shadow: none;
}

/* 悬停状态 */
.section-filters .el-radio-button__inner:hover,
.alert-filters .el-radio-button__inner:hover {
	color: #7B68EE;
	border-color: #7B68EE;
}

.section-filters .el-radio-button__orig-radio:checked + .el-radio-button__inner:hover,
.alert-filters .el-radio-button__orig-radio:checked + .el-radio-button__inner:hover {
	color: #fff;
}

/* 底部查看更多按钮 */
.section-footer, .alert-footer {
	text-align: center;
	padding-top: 15px;
	margin-top: 15px;
	border-top: 1px solid var(--border-color);
}

.section-footer .el-button,
.alert-footer .el-button {
	font-size: 14px;
	color: var(--primary-color);
}

.section-footer .el-button:hover,
.alert-footer .el-button:hover {
	color: var(--primary-hover);
}

.section-footer .el-button i,
.alert-footer .el-button i {
	margin-right: 5px;
}

/* 监控视频网格 */
.camera-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	margin-bottom: 0;
}

.camera-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px 0 rgba(102, 126, 234, 0.1);
	transition: all 0.3s ease;
}

.camera-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px 0 rgba(102, 126, 234, 0.2);
}

.camera-feed {
	position: relative;
	/* height: 200px; */
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.camera-feed video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

.camera-overlay {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
}

.alert-badge {
	padding: 4px 8px;
	border-radius: 4px;
	color: #fff;
	font-size: 12px;
}

.alert-badge.warning {
	background: var(--warning-color);
}

.alert-badge.danger {
	background: var(--danger-color);
}

.camera-info {
	padding: 15px;
}

.camera-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.camera-details {
	margin: 10px 0;
}

.detail-item {
	display: flex;
	align-items: center;
	margin-bottom: 5px;
	color: var(--text-regular);
	font-size: 13px;
}

.detail-item i {
	margin-right: 5px;
	color: var(--primary-color);
}

.camera-status {
	display: flex;
	align-items: center;
	font-size: 13px;
}

.status-indicator {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 5px;
}

.status-normal {
	background-color: var(--success-color);
}

.status-warning {
	background-color: var(--warning-color);
}

.status-danger {
	background-color: var(--danger-color);
}

/* 告警列表 */
.alert-item {
	border-left: 4px solid var(--info-color);
	margin-bottom: 15px;
	padding: 15px;
	background: var(--background-color);
	border-radius: 0 4px 4px 0;
	transition: all 0.3s ease;
}

.alert-item:hover {
	background: #f0f2f5;
}

.alert-item.alert-warning {
	border-left-color: var(--warning-color);
}

.alert-item.alert-danger {
	border-left-color: var(--danger-color);
}

.alert-item .alert-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.alert-title {
	display: flex;
	align-items: center;
}

.alert-title i {
	margin-right: 8px;
	font-size: 16px;
	color: var(--primary-color);
}

.alert-time {
	color: var(--text-secondary);
	font-size: 12px;
}

.alert-description {
	color: var(--text-regular);
	margin-bottom: 10px;
}

.alert-details {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	font-size: 13px;
	color: var(--text-secondary);
}

.alert-details span {
	display: flex;
	align-items: center;
}

.alert-details span i {
	margin-right: 5px;
	color: var(--primary-color);
}

.alert-actions {
	margin-top: 10px;
	display: flex;
	gap: 15px;
}

.alert-actions .el-button--text {
	color: var(--primary-color);
}

.alert-actions .el-button--text:hover {
	color: var(--primary-hover);
}

/* 响应式设计 */
@media (max-width: 1200px) {
	.camera-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.camera-grid {
		grid-template-columns: 1fr;
	}

	.section-header, .alert-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.section-filters, .alert-filters {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
		width: 100%;
	}

	.section-filters .el-radio-button,
	.alert-filters .el-radio-button {
		margin-right: 0;
	}

	.section-filters .el-radio-button__inner,
	.alert-filters .el-radio-button__inner {
		width: 100%;
		text-align: center;
	}

	.alert-details {
		flex-direction: column;
		gap: 8px;
	}

	.section-footer .el-button,
	.alert-footer .el-button {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.camera-grid {
		grid-template-columns: 1fr;
	}

	.stats-grid {
		grid-template-columns: 1fr;
	}

	.alert-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.alert-header span {
		margin-top: 4px;
	}
}

/* Element UI 组件样式覆盖 */
.el-radio-button__inner {
	background: transparent;
	border-color: var(--primary-color);
	color: var(--primary-color);
}

.el-radio-button__orig-radio:checked + .el-radio-button__inner {
	background: var(--primary-gradient);
	border-color: transparent;
	box-shadow: -1px 0 0 0 var(--primary-color);
}

.el-button--primary {
	background: var(--primary-gradient);
	border: none;
}

.el-button--primary:hover, 
.el-button--primary:focus {
	background: linear-gradient(135deg, #7b93ff 0%, #8b5db9 100%);
	border: none;
}